home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / gas_251.zip / bin_251 / bfd / nlm-target.h < prev    next >
C/C++ Source or Header  |  1994-06-20  |  8KB  |  234 lines

  1. /* Target definitions for 32/64-bit NLM (NetWare Loadable Module)
  2.    Copyright (C) 1993, 1994 Free Software Foundation, Inc.
  3.  
  4. This file is part of BFD, the Binary File Descriptor library.
  5.  
  6. This program is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2 of the License, or
  9. (at your option) any later version.
  10.  
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. #define nlm_core_file_p _bfd_dummy_target
  21.  
  22. #define nlm_get_symtab_upper_bound nlmNAME(get_symtab_upper_bound)
  23. #define nlm_get_symtab nlmNAME(get_symtab)
  24. #define nlm_make_empty_symbol nlmNAME(make_empty_symbol)
  25. #define nlm_print_symbol nlmNAME(print_symbol)
  26. #define nlm_get_symbol_info nlmNAME(get_symbol_info)
  27. #define nlm_bfd_is_local_label bfd_generic_is_local_label
  28. #define nlm_get_lineno _bfd_nosymbols_get_lineno
  29. #define nlm_find_nearest_line _bfd_nosymbols_find_nearest_line
  30. #define nlm_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
  31.  
  32. #define nlm_get_reloc_upper_bound nlmNAME(get_reloc_upper_bound)
  33. #define nlm_canonicalize_reloc nlmNAME(canonicalize_reloc)
  34. #define nlm_bfd_reloc_type_lookup bfd_default_reloc_type_lookup
  35.  
  36. #define nlm_set_section_contents nlmNAME(set_section_contents)
  37.  
  38. #define nlm_sizeof_headers _bfd_nolink_sizeof_headers
  39. #define nlm_bfd_get_relocated_section_contents \
  40.   bfd_generic_get_relocated_section_contents
  41. #define nlm_bfd_relax_section bfd_generic_relax_section
  42. #define nlm_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
  43. #define nlm_bfd_link_add_symbols _bfd_generic_link_add_symbols
  44. #define nlm_bfd_final_link _bfd_generic_final_link
  45.  
  46. /* This structure contains everything that BFD knows about a target.
  47.    It includes things like its byte order, name, what routines to call
  48.    to do various operations, etc.  Every BFD points to a target structure
  49.    with its "xvec" member.
  50.  
  51.    There are two such structures here:  one for big-endian machines and
  52.    one for little-endian machines.   */
  53.  
  54.  
  55. #ifdef TARGET_BIG_SYM
  56. const bfd_target TARGET_BIG_SYM =
  57. {
  58.   /* name: identify kind of target */
  59.   TARGET_BIG_NAME,
  60.  
  61.   /* flavour: general indication about file */
  62.   bfd_target_nlm_flavour,
  63.  
  64.   /* byteorder_big_p: data is big endian */
  65.   true,
  66.  
  67.   /* header_byteorder_big_p: header is also big endian */
  68.   true,
  69.  
  70.   /* object_flags: mask of all file flags */
  71.   (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
  72.    | WP_TEXT),
  73.   
  74.   /* section_flags: mask of all section flags */
  75.   (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
  76.    SEC_CODE | SEC_DATA), 
  77.  
  78.    /* leading_symbol_char: is the first char of a user symbol
  79.       predictable, and if so what is it */
  80.    0,
  81.  
  82.   /* ar_pad_char: pad character for filenames within an archive header
  83.      FIXME:  this really has nothing to do with NLM, this is a characteristic
  84.      of the archiver and/or os and should be independently tunable */
  85.   '/',
  86.  
  87.   /* ar_max_namelen: maximum number of characters in an archive header
  88.      FIXME:  this really has nothing to do with NLM, this is a characteristic
  89.      of the archiver and should be independently tunable.  This value is
  90.      a WAG (wild a** guess) */
  91.   15,
  92.  
  93.   /* align_power_min: minimum alignment restriction for any section
  94.      FIXME:  this value may be target machine dependent */
  95.   3,
  96.  
  97.   /* Routines to byte-swap various sized integers from the data sections */
  98.   bfd_getb64, bfd_getb_signed_64, bfd_putb64,
  99.     bfd_getb32, bfd_getb_signed_32, bfd_putb32,
  100.     bfd_getb16, bfd_getb_signed_16, bfd_putb16,
  101.  
  102.   /* Routines to byte-swap various sized integers from the file headers */
  103.   bfd_getb64, bfd_getb_signed_64, bfd_putb64,
  104.     bfd_getb32, bfd_getb_signed_32, bfd_putb32,
  105.     bfd_getb16, bfd_getb_signed_16, bfd_putb16,
  106.  
  107.   /* bfd_check_format: check the format of a file being read */
  108.   { _bfd_dummy_target,        /* unknown format */
  109.     nlmNAME(object_p),        /* assembler/linker output (object file) */
  110.     bfd_generic_archive_p,    /* an archive */
  111.     nlm_core_file_p        /* a core file */
  112.   },
  113.  
  114.   /* bfd_set_format: set the format of a file being written */
  115.   { bfd_false,
  116.     nlm_mkobject,
  117.     _bfd_generic_mkarchive,
  118.     bfd_false
  119.   },
  120.  
  121.   /* bfd_write_contents: write cached information into a file being written */
  122.   { bfd_false,
  123.     nlmNAME(write_object_contents),
  124.     _bfd_write_archive_contents,
  125.     bfd_false
  126.   },
  127.  
  128.   /* Initialize a jump table with the standard macro.  All names start with
  129.      "nlm" */
  130.   BFD_JUMP_TABLE_GENERIC (_bfd_generic),
  131.   BFD_JUMP_TABLE_COPY (_bfd_generic),
  132.   BFD_JUMP_TABLE_CORE (_bfd_nocore),
  133.   BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
  134.   BFD_JUMP_TABLE_SYMBOLS (nlm),
  135.   BFD_JUMP_TABLE_RELOCS (nlm),
  136.   BFD_JUMP_TABLE_WRITE (nlm),
  137.   BFD_JUMP_TABLE_LINK (nlm),
  138.   BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
  139.  
  140.   /* backend_data: */
  141.   (PTR) TARGET_BACKEND_DATA
  142. };
  143. #endif
  144.  
  145. #ifdef TARGET_LITTLE_SYM
  146. const bfd_target TARGET_LITTLE_SYM =
  147. {
  148.   /* name: identify kind of target */
  149.   TARGET_LITTLE_NAME,
  150.  
  151.   /* flavour: general indication about file */
  152.   bfd_target_nlm_flavour,
  153.  
  154.   /* byteorder_big_p: data is big endian */
  155.   false,        /* Nope -- this one's little endian */
  156.  
  157.   /* header_byteorder_big_p: header is also big endian */
  158.   false,        /* Nope -- this one's little endian */
  159.  
  160.   /* object_flags: mask of all file flags */
  161.   (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
  162.    | WP_TEXT),
  163.   
  164.   /* section_flags: mask of all section flags */
  165.   (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
  166.    SEC_DATA), 
  167.  
  168.    /* leading_symbol_char: is the first char of a user symbol
  169.       predictable, and if so what is it */
  170.    0,
  171.  
  172.   /* ar_pad_char: pad character for filenames within an archive header
  173.      FIXME:  this really has nothing to do with NLM, this is a characteristic
  174.      of the archiver and/or os and should be independently tunable */
  175.   '/',
  176.  
  177.   /* ar_max_namelen: maximum number of characters in an archive header
  178.      FIXME:  this really has nothing to do with NLM, this is a characteristic
  179.      of the archiver and should be independently tunable.  This value is
  180.      a WAG (wild a** guess) */
  181.   15,
  182.  
  183.   /* align_power_min: minimum alignment restriction for any section
  184.      FIXME:  this value may be target machine dependent */
  185.   3,
  186.  
  187.   /* Routines to byte-swap various sized integers from the data sections */
  188.   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
  189.     bfd_getl32, bfd_getl_signed_32, bfd_putl32,
  190.     bfd_getl16, bfd_getl_signed_16, bfd_putl16,
  191.  
  192.   /* Routines to byte-swap various sized integers from the file headers */
  193.   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
  194.     bfd_getl32, bfd_getl_signed_32, bfd_putl32,
  195.     bfd_getl16, bfd_getl_signed_16, bfd_putl16,
  196.  
  197.   /* bfd_check_format: check the format of a file being read */
  198.   { _bfd_dummy_target,        /* unknown format */
  199.     nlmNAME(object_p),        /* assembler/linker output (object file) */
  200.     bfd_generic_archive_p,    /* an archive */
  201.     nlm_core_file_p        /* a core file */
  202.   },
  203.  
  204.   /* bfd_set_format: set the format of a file being written */
  205.   { bfd_false,
  206.     nlm_mkobject,
  207.     _bfd_generic_mkarchive,
  208.     bfd_false
  209.   },
  210.  
  211.   /* bfd_write_contents: write cached information into a file being written */
  212.   { bfd_false,
  213.     nlmNAME(write_object_contents),
  214.     _bfd_write_archive_contents,
  215.     bfd_false
  216.   },
  217.  
  218.   /* Initialize a jump table with the standard macro.  All names start with
  219.      "nlm" */
  220.   BFD_JUMP_TABLE_GENERIC (_bfd_generic),
  221.   BFD_JUMP_TABLE_COPY (_bfd_generic),
  222.   BFD_JUMP_TABLE_CORE (_bfd_nocore),
  223.   BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
  224.   BFD_JUMP_TABLE_SYMBOLS (nlm),
  225.   BFD_JUMP_TABLE_RELOCS (nlm),
  226.   BFD_JUMP_TABLE_WRITE (nlm),
  227.   BFD_JUMP_TABLE_LINK (nlm),
  228.   BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
  229.  
  230.   /* backend_data: */
  231.   (PTR) TARGET_BACKEND_DATA
  232. };
  233. #endif
  234.